package exception;

public class ThrowDemo {
    public static void main(String[] args){
        try {
            Person p = new Person();
            p.setAge(150);
            System.out.println("年龄是"+p.getAge()+"岁");
        } catch (IllegalAgeException e) {
            e.printStackTrace();
        }

    }
}
